home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / FAGE.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  41 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   FAGE    .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NB02.INC"
  19. COLOR 7,0
  20. CLS
  21.  
  22. ? "┌────────────────────────────────────────────────────────────────
  23. ? "│ fAge% ( BirthDate$ )
  24. ? "├───────────────────────────────────────────────────────────────────
  25. ? "│ A simple little routine to compute elapsed whole years since
  26. ? "│ BirthDate$. Give it a try!
  27. ? "│ All it does is reduce the incoming string into a WORD, subtract the
  28. ? "│ WORD from today's value, multiply by 4 then divide by 1461! Simple!
  29. ? "│ Age% = ( 4 * ( Today?? - BirthDate?? ) ) \ 1461
  30. ? "└─────────────────────────────────────────────────────────────────────
  31.  
  32. BirthDate$ = "12-26-1947"
  33. ' BirthDate$ = "02-30-1947"  ' a bad date un-rem it to see...
  34.  
  35. PRINT
  36. PRINT "Your birthdate is: "; BirthDate$
  37. PRINT "         Today is: "; fSYSDate$
  38. PRINT
  39. PRINT "   That makes you:" ; fAge%( BirthDate$ ); "years old"
  40.  
  41.